package com.example.tmp;


import lombok.Data;

import java.sql.Timestamp;
import java.util.Objects;

@Data
public class SysMenu extends TreeEntity<Long> {


    private Long id;


    private String name;


    private Long sort;

    /**
     * 类型，目录、菜单、按钮
     */
    private Integer type;


    private String permission;


    private String path;

    private String component;


    private String componentName;

    private String icon;

    private Boolean cache;


    private Boolean hidden;

    /**
     * 上级菜单ID
     */

    private Long parentId;

    /**
     * 是否为外链 true/false
     */

    private Boolean iFrame;


    private Integer status = 1;


    private Boolean isDeleted = false;


    private Timestamp createTime;


    private Timestamp updateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || this.getClass() != o.getClass()) return false;
        SysMenu menu = (SysMenu) o;
        return Objects.equals(this.id, menu.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.id);
    }

    public interface Update {
    }
}
